package com.yc.bean;
import org.springframework.beans.factory.FactoryBean;

public class PersonFactoryBean implements FactoryBean<Person>{
    @Override
    public Person getObject() throws Exception {
        //此类任由程序员本人实现
        return  new Person();
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }


    //若想多例，直接将其返回结果改为return false；
    //return true 表示返回单例
    @Override
    public boolean isSingleton() {
        return true;
    }
}
